import { useLocation } from "react-router-dom"

function useTitle() {
    let location = useLocation()
    let title = "首页"
    if (location.pathname == "/") {

    }
    else if (location.pathname == "/getmoney") {
        title = "提现"
    }
    else if (location.pathname == "/record") {
        title = "记录"
    }
    else if (location.pathname == "/help") {
        title = "帮助中心"
    }
    else if (location.pathname == "/goods") {

    }
    return [title]
}

export { useTitle }